import request from '@/utils/request'

// 查询用量数据列表
export function getDosageList(query) {
    let baseUrl = '/datastatistics/terminalXbStatisticAnalysis/dosageUprush?pageNum=' + query.pageNum + '&pageSize=' + query.pageSize + '&systemFlag=' + query.systemFlag + '&loginUserId=' + query.loginUserId
    if (query.nowMonth != null && query.nowMonth != '') {
        baseUrl += '&nowMonth=' + query.nowMonth
    }
    if (query.comparisonMonth != null && query.comparisonMonth != '') {
        baseUrl += '&comparisonMonth=' + query.comparisonMonth
    }
    if (query.comparisonRate != null && query.comparisonRate != '') {
        baseUrl += '&comparisonRate=' + query.comparisonRate
    }
    if (query.userId != null && query.userId != '') {
        baseUrl += '&userId=' + query.userId
    }
    if (query.symbol != null && query.symbol != '') {
        baseUrl += '&symbol=' + query.symbol
    }
    if (query.userName != null && query.userName != '') {
        baseUrl += '&userName=' + query.userName
    }
    if (query.terminalId != null && query.terminalId != '') {
        baseUrl += '&terminalId=' + query.terminalId
    }
    if (query.communicateAddress != null && query.communicateAddress != '') {
        baseUrl += '&communicateAddress=' + query.communicateAddress
    }
    if (query.sheetsCode != null) {
        baseUrl += '&sheetsCode=' + query.sheetsCode
    }
    if (query.orderByColumn != null) {
        baseUrl += '&orderByColumn=' + query.orderByColumn
    }
    if (query.isAsc != null) {
        baseUrl += '&isAsc=' + query.isAsc
    }
    return request({
        url: baseUrl,
        // url: '/datastatistics/terminalXbStatisticAnalysis/dosageUprush?sheetsCode=' + query.sheetsCode + '&nowMonth=' + query.nowMonth + '&comparisonMonth=' + query.comparisonMonth
        // + '&pageNum=' + query.pageNum + '&pageSize=' + query.pageSize + '&rate=' + query.rate + '&userId=' + query.userId + '&symbol=' + query.symbol + '&userName=' + query.userName + '&terminalId=' + query.terminalId + '&communicateAddress=' + query.communicateAddress,
        method: 'get',
        // params: query
    })
}
